// Code generated by mockery v2.33.1. DO NOT EDIT.

package mocks

import (
	io "io"

	envelope "github.com/wal-g/wal-g/internal/crypto/envelope"

	mock "github.com/stretchr/testify/mock"
)

// Enveloper is an autogenerated mock type for the Enveloper type
type Enveloper struct {
	mock.Mock
}

type Enveloper_Expecter struct {
	mock *mock.Mock
}

func (_m *Enveloper) EXPECT() *Enveloper_Expecter {
	return &Enveloper_Expecter{mock: &_m.Mock}
}

// DecryptKey provides a mock function with given fields: _a0
func (_m *Enveloper) DecryptKey(_a0 *envelope.EncryptedKey) ([]byte, error) {
	ret := _m.Called(_a0)

	var r0 []byte
	var r1 error
	if rf, ok := ret.Get(0).(func(*envelope.EncryptedKey) ([]byte, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*envelope.EncryptedKey) []byte); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}

	if rf, ok := ret.Get(1).(func(*envelope.EncryptedKey) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Enveloper_DecryptKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecryptKey'
type Enveloper_DecryptKey_Call struct {
	*mock.Call
}

// DecryptKey is a helper method to define mock.On call
//   - _a0 *envelope.EncryptedKey
func (_e *Enveloper_Expecter) DecryptKey(_a0 interface{}) *Enveloper_DecryptKey_Call {
	return &Enveloper_DecryptKey_Call{Call: _e.mock.On("DecryptKey", _a0)}
}

func (_c *Enveloper_DecryptKey_Call) Run(run func(_a0 *envelope.EncryptedKey)) *Enveloper_DecryptKey_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*envelope.EncryptedKey))
	})
	return _c
}

func (_c *Enveloper_DecryptKey_Call) Return(_a0 []byte, _a1 error) *Enveloper_DecryptKey_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Enveloper_DecryptKey_Call) RunAndReturn(run func(*envelope.EncryptedKey) ([]byte, error)) *Enveloper_DecryptKey_Call {
	_c.Call.Return(run)
	return _c
}

// Name provides a mock function with given fields:
func (_m *Enveloper) Name() string {
	ret := _m.Called()

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

// Enveloper_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
type Enveloper_Name_Call struct {
	*mock.Call
}

// Name is a helper method to define mock.On call
func (_e *Enveloper_Expecter) Name() *Enveloper_Name_Call {
	return &Enveloper_Name_Call{Call: _e.mock.On("Name")}
}

func (_c *Enveloper_Name_Call) Run(run func()) *Enveloper_Name_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Enveloper_Name_Call) Return(_a0 string) *Enveloper_Name_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Enveloper_Name_Call) RunAndReturn(run func() string) *Enveloper_Name_Call {
	_c.Call.Return(run)
	return _c
}

// ReadEncryptedKey provides a mock function with given fields: _a0
func (_m *Enveloper) ReadEncryptedKey(_a0 io.Reader) (*envelope.EncryptedKey, error) {
	ret := _m.Called(_a0)

	var r0 *envelope.EncryptedKey
	var r1 error
	if rf, ok := ret.Get(0).(func(io.Reader) (*envelope.EncryptedKey, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(io.Reader) *envelope.EncryptedKey); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*envelope.EncryptedKey)
		}
	}

	if rf, ok := ret.Get(1).(func(io.Reader) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Enveloper_ReadEncryptedKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadEncryptedKey'
type Enveloper_ReadEncryptedKey_Call struct {
	*mock.Call
}

// ReadEncryptedKey is a helper method to define mock.On call
//   - _a0 io.Reader
func (_e *Enveloper_Expecter) ReadEncryptedKey(_a0 interface{}) *Enveloper_ReadEncryptedKey_Call {
	return &Enveloper_ReadEncryptedKey_Call{Call: _e.mock.On("ReadEncryptedKey", _a0)}
}

func (_c *Enveloper_ReadEncryptedKey_Call) Run(run func(_a0 io.Reader)) *Enveloper_ReadEncryptedKey_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(io.Reader))
	})
	return _c
}

func (_c *Enveloper_ReadEncryptedKey_Call) Return(_a0 *envelope.EncryptedKey, _a1 error) *Enveloper_ReadEncryptedKey_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Enveloper_ReadEncryptedKey_Call) RunAndReturn(run func(io.Reader) (*envelope.EncryptedKey, error)) *Enveloper_ReadEncryptedKey_Call {
	_c.Call.Return(run)
	return _c
}

// SerializeEncryptedKey provides a mock function with given fields: _a0
func (_m *Enveloper) SerializeEncryptedKey(_a0 *envelope.EncryptedKey) []byte {
	ret := _m.Called(_a0)

	var r0 []byte
	if rf, ok := ret.Get(0).(func(*envelope.EncryptedKey) []byte); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}

	return r0
}

// Enveloper_SerializeEncryptedKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeEncryptedKey'
type Enveloper_SerializeEncryptedKey_Call struct {
	*mock.Call
}

// SerializeEncryptedKey is a helper method to define mock.On call
//   - _a0 *envelope.EncryptedKey
func (_e *Enveloper_Expecter) SerializeEncryptedKey(_a0 interface{}) *Enveloper_SerializeEncryptedKey_Call {
	return &Enveloper_SerializeEncryptedKey_Call{Call: _e.mock.On("SerializeEncryptedKey", _a0)}
}

func (_c *Enveloper_SerializeEncryptedKey_Call) Run(run func(_a0 *envelope.EncryptedKey)) *Enveloper_SerializeEncryptedKey_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*envelope.EncryptedKey))
	})
	return _c
}

func (_c *Enveloper_SerializeEncryptedKey_Call) Return(_a0 []byte) *Enveloper_SerializeEncryptedKey_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Enveloper_SerializeEncryptedKey_Call) RunAndReturn(run func(*envelope.EncryptedKey) []byte) *Enveloper_SerializeEncryptedKey_Call {
	_c.Call.Return(run)
	return _c
}

// NewEnveloper creates a new instance of Enveloper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewEnveloper(t interface {
	mock.TestingT
	Cleanup(func())
}) *Enveloper {
	mock := &Enveloper{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
